<ul class="breadcrumb">
	<li><a href="{$BASE_PATH}admin/perfil">Perfil</a></li>
	<li>Vincular usuário(s) ao perfil {$perfil->getDsNome()}</li>
</ul>
<form action='{$BASE_PATH}' method='post'>
	{$form->getElement('application')->render()}
	{$form->getElement('controller')->render()}
	{$form->getElement('method')->render()}
	{$form->getElement('perfil[id_perfil]')->render()}
	<div class="control-group">
		{$form->getElement('perfil[usuarios][]')->getLabel()->render()}
		<div class="controls">
			{$form->getElement('perfil[usuarios][]')->render()}
		</div>
	</div>
	<div class="boxActions">
		{$form->getElement('salvar')->render()}
	</div>
</form>

<table id='dataTablePerfil' class="tableList">
	<thead>
		<tr>
			<th width="1%"><a href='#'>Ações</a></th>
			<th><a href='#'>Usuário</a></th>
		</tr>
	</thead>
	<tbody>
		{foreach from=$perfil->getUsuarios() key=k item=i}
		<tr>
			<td>{$Action->getClass('\Helper\Action\Admin\Perfil')->excluirUsuario($perfil, $i)}</td>
			<td class='txtLeft'>{$i->getDsNome()}</td>
		</tr>
		{/foreach}
	</tbody>
</table>
<script>
	$(document).ready(function(){
		initDataTable('#dataTablePerfil');
	});
</script>
